package com.study.mall.mallmember.controller;


import com.study.mall.mallmember.entity.UmsMember;
import com.study.mall.mallmember.feign.CouponFeignService;
import com.stydy.mallcommon.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 会员 前端控制器
 * </p>
 *
 * @author admin
 * @since 2022-03-05
 */
@RestController
@RequestMapping("member")
public class UmsMemberController {
    @Autowired
    private CouponFeignService couponFeignService;
    @RequestMapping("/test")
    public R test(){
        UmsMember member = new UmsMember();
        member.setNickname("lishilin");
        R memberCoupon = couponFeignService.memberCoupon();
        return R.ok().put("member",member).put("coupon",memberCoupon.get("coupon"));
    }
    @GetMapping("/test1")
    public R test1(){
        R m = couponFeignService.test();
        return R.ok().put("test",m.get("1"));
    }
}

